import React from "react";
import ReactDOM from "react-dom";
// import "./index.css";
import style from "./index.module.css";
import App from "./App";

import logo from "./logo.svg";
const name = "React";
// const jsx = <div>hello jsxxxxxx!!Hello, {name}</div>;

const obj = {
  firstName: "Paul",
  lastName: "Chris",
};
// serviceWorker.unregister();
function formatName(name) {
  return name.firstName + " " + name.lastName;
}
const show = true;
const greet = <div>gooood</div>;
const a = [0, 1, 2];
const jsx = (
  <div className={style.app}>
    <div>hello, {name}</div>
    <div>{formatName(obj)}</div>
    {greet}
    {show ? greet : "登录"}
    {show && greet}
    <ul>
      {/* {a.map((item) => {
        return <li key={item}>{item}</li>;
      })} */}
      {a.map((item) => (
        <li key={item}>{item}</li>
      ))}
      {/* {<li>{a}</li>} */}
    </ul>
    <img
      src={logo}
      // className="logo"
      className={style.logo}
      // style={{ width: "180px", height: "100px" }}
    />
  </div>
);
ReactDOM.render(<App></App>, document.getElementById("root"));
